package com.cong.security.core.social.qq.connect;

import com.cong.security.core.social.qq.api.QQ;
import org.springframework.social.connect.support.OAuth2ConnectionFactory;

/**
 * 泛型同样是QQ
 */
public class QQConnectionFactory extends OAuth2ConnectionFactory<QQ> {

	/**
	 * 创建连接工厂构造函数
	 * 
	 * @param providerId
	 *            QQ的openId
	 * @param appId
	 *            QQ互联AppId
	 * @param appSecret
	 *            QQ互联appSecret
	 */
	public QQConnectionFactory(String providerId, String appId, String appSecret) {
		/**
		 * providerId---服务提供商唯一标识、配置文件配进来<br>
		 * appId---QQ互联appId<br>
		 * appSecret---QQ互联appSecret<br>
		 */
		super(providerId, new QQServiceProvider(appId, appSecret), new QQAdapter());
	}
}